﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ECCIT;
using ECCIT.Data;
using OgilvyOne.Model;
using System.Data;

namespace OgilvyOne.IDAL
{
    public interface  IDALUser
    {
        /// <summary>
        /// 将xml字符串保存到表中
        /// </summary>
        /// <param name="sb">xml字符串</param>
        /// <param name="guid">guid</param>
        /// <returns>返回id</returns>
        int SaveXml(StringBuilder sb, string guid, string lang);
        /// <summary>
        /// 获取Strxml
        /// </summary>
        /// <param name="guid">guid</param>
        /// <returns>返回value</returns>
        string GetXml(string guid);
        /// <summary>
        /// 根据guid删除xml
        /// </summary>
        /// <param name="guid"></param>
        /// <returns></returns>
        int DeleXml(string guid);

        /// <summary>
        /// 保存注册信息
        /// </summary>
        /// <param name="surName">姓</param>
        /// <param name="presonalName">名</param>
        /// <param name="toMail1">邮箱1</param>
        /// <param name="toMail2">邮箱2</param>
        /// <param name="toMail3">邮箱3</param>
        /// <param name="lang">cn or en</param>
        /// <returns></returns>
        int SaveSendMail(string surName, string presonalName, string toMail1, string toMail2, string toMail3, string lang, string friendName1, string friendName2, string friendName3, string userEmail, string mobile);
        
        /// <summary>
        /// 检查email是否存在
        /// </summary>
        /// <param name="email">string 邮箱</param>
        /// <returns>成功 返回1 失败返回0</returns>
        int IsExist(string email);
        /// <summary>
        /// 
        /// </summary>
        /// <param name="startTime"></param>
        /// <param name="endTime"></param>
        /// <returns></returns>
        DataTable GetExcel(string startTime, string endTime);
        /// <summary>
        /// 保存联系我们资料
        /// </summary>
        /// <param name="title">标题</param>
        /// <param name="name">姓名</param>
        /// <param name="email">邮箱</param>
        /// <param name="country">国家</param>
        /// <param name="message">信息</param>
        /// <param name="lang">语言</param>
        /// <returns></returns>
        int SaveContacUs(string title, string name, string email, string country, string message, string lang);

        /// <summary>
        /// 验证contactUs邮箱
        /// </summary>
        /// <param name="email"></param>
        /// <returns>成功 1 失败 0</returns>
        int CheckEmailOFContacUs(string email);
    }
}
